import { AD_RECEIVE } from '../constants/ActionTypes';
import { GET } from '../utils/Request';
import { HOME_HISTORY } from '../constants/Api';

export const updateReduxData = () => async dispatch => {
  await GET(HOME_HISTORY).then(res =>
    {
      if(res.code==200){
        dispatch(setReduxData(res.Data[0].telephone))
      }
    }
   
  );
};

export function setReduxData(payload) {
  return {
    type: AD_RECEIVE,
    payload,
  };
}
